//
//  LevelSelectScene.m
//  SpeedTap
//
//  Created by Chi Ho Chiu on 20/8/11.
//  Copyright 2011 Individual. All rights reserved.
//

#import "LevelSelectScene.h"
#import "GameManager.h"

@implementation LevelSelectScene
@synthesize levelSelectLayer;

-(id) init
{
    if( (self = [super init]) )
    {
        self.levelSelectLayer = [LevelSelectLayer node];
        levelSelectLayer.delegate = self;
        
        [self addChild:levelSelectLayer];
    }
    return self;
}

-(void) dealloc
{
	[levelSelectLayer release];
    [super dealloc];
}

-(void) onBackSelected
{
    [[GameManager sharedGameManager] replaceScene:kGAME_SCENE_MAIN_MENU];
}

-(void) onLevelSelected:(int)iLevel
{
    [[GameManager sharedGameManager] replaceScene:(EGameScene)iLevel];
}

@end
